package dmir.lda.adapters;

import java.util.Set;

public interface LdaAdapter {

	/**
     * Returns the number of tokens/words on which the LDA model is based.
     *
     * @return The number of words in this model.
     */
	public int numTokens();
	
	
	/**
     * Returns the number of documents on which the LDA model is based.
     *
     * @return The number of documents for the sample.
     */
	public int numDocuments();
	
	
	/**
     * Returns the number of topics in this LDA model.
     *
     * @return The number of topics in this model.
     */
	public int numTopics();
	
	
	/**
     * Returns the tokens that form the specified document.
     *
     * @param doc Document identifier.
     * @return Token identifiers present in the specified document.
     */
	public Set<Integer> docTokens(int doc);
	
	
	/**
     * Returns the topic probabilities for the specified token.
     *
     * @param token Token identifier [0, numTokens-1].
     * @return Topic probabilities for the specified token.
     */
	public double[] tokenProbabilities(int token);
	
	
	/**
     * Returns the topic probabilities for the specified document.
     *
     * @param doc Document identifier [0, numDocs-1].
     * @return Topic probabilities for the specified document.
     */
	public double[] docProbabilities(int doc);
	
}
